/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exemple2;

/**
 *
 * @author Danicela
 */
public class HelloAction {

    private String nom;
// propriété nom rw
    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public String getHelloMessage() {
        return "Bonjour, " + nom;
    }

    public String execute() {
        if (nom.startsWith("p")) {
            return "success";
        } else {
            return "error";
        }
    }
}
